<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>欢迎您</title>
<script type="text/javascript">
	function queryAll(){
		$.ajax({
	        url:'/index/queryAll',
	        type:"get",
	        dataType:'json',
	        beforeSend:function(){
	            $(".btn-primary").attr("disabled",true);
	        },
	        success:function(result){
	            if(result.code=="0"){
	                $('div.datas').text(JSON.stringify(result));
	            }else{
	                alert(result.message);
	            }
	        },
	        error:function(){
	            alert("查询数据异常");
	        },
	        complete:function(){
	            $(".btn-primary").removeAttr("disabled");
	        }
	    });
	}
</script>
</head>
<body>
	<div class="main-content">
		<div class="main-content-inner">
			<div class="page-content">
				欢迎您！<input type="button" value="查询" onclick="queryAll()">
			</div>
			<div class="datas"></div>
		</div>
	</div>
</body>
</html>